import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    addOrUpdateVisible: false,
    mechanismTableData: {},
    isAdd: true,
  },
  mutations: {
    SET_ADDORUPDATEVISIBLE: (state, addOrUpdateVisible) => {
      state.addOrUpdateVisible = addOrUpdateVisible;
    },
    SET_MECHANISMTABLEDATA: (state, mechanismTableData) => {
      state.mechanismTableData = mechanismTableData;
    },
    SET_ISADD: (state, isAdd) => {
      state.isAdd = isAdd;
    },
  },
  actions: {},
  modules: {},
});
